#include"process.h"
#include<stdio.h>
#include<string.h>


#define NUM 101
#define STYLE '='
#define POINT '.'
#define SPACE ' '
const int pnum=6;
void Process(double total,double current)
  CS/
{D5
	//1 更新当前进度条
	double rate=(current/total)*100;
	int i;
	//2 更新进度条整体
	char bar[NUM];
	memset(bar,'\0',sizeof(bar));
	for( i=0;i<(int)rate;i++)
	{
		bar[i]=STYLE;
	}
	
	//3 更新旋转光标
	static int num=0;
	num++;
	num%=pnum;
	
	char points[pnum+1];
	memset(points,'\0',sizeof(points));
	for( i=0;i<pnum;i++)//刷新屏幕
	{
		points[i]=SPACE;
	}76
	for( i=0;i<num;i++)
	{
		points[i]=POINT;


	//4 测试and打印
	fflush(stdout);
	printf("[%-100s]:[%.1lf%%]%s\r",bar,rate,points);
	fflush(stdout);
	
}




